home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
misc
/
mount
/
mount-pa.cd
/
mount-pa
Wrap
Text File
|
1993-03-30
|
19KB
|
647 lines
*** linux/boot/bootsect.S.~1~ Fri Feb 26 17:10:31 1993
--- linux/boot/bootsect.S Tue Mar 30 10:18:48 1993
***************
*** 45,50 ****
--- 45,53 ----
#ifndef RAMDISK
#define RAMDISK 0
#endif
+ #ifndef CONFIG_ROOT_RDONLY
+ #define CONFIG_ROOT_RDONLY 0
+ #endif
! ld86 requires an entry symbol. This may as well be the usual one.
.globl _main
***************
*** 429,435 ****
.byte 13,10
.ascii "Loading"
! .org 500
syssize:
.word SYSSIZE
swap_dev:
--- 432,440 ----
.byte 13,10
.ascii "Loading"
! .org 498
! root_flags:
! .word CONFIG_ROOT_RDONLY
syssize:
.word SYSSIZE
swap_dev:
*** linux/config.in.~1~ Mon Mar 22 19:28:10 1993
--- linux/config.in Tue Mar 30 09:00:50 1993
***************
*** 46,51 ****
--- 46,53 ----
.
Filesystems
.
+ Mount root initially readonly
+ CONFIG_ROOT_RDONLY y/n n
Standard (minix) fs support
CONFIG_MINIX_FS y/n y
Extended fs support
*** linux/fs/ext/inode.c.~1~ Mon Mar 29 22:33:16 1993
--- linux/fs/ext/inode.c Mon Mar 29 22:34:04 1993
***************
*** 53,59 ****
ext_statfs
};
! struct super_block *ext_read_super(struct super_block *s,void *data)
{
struct buffer_head *bh;
struct ext_super_block *es;
--- 53,60 ----
ext_statfs
};
! struct super_block *ext_read_super(struct super_block *s,void *data,
! int silent)
{
struct buffer_head *bh;
struct ext_super_block *es;
***************
*** 82,88 ****
if (s->s_magic != EXT_SUPER_MAGIC) {
s->s_dev = 0;
unlock_super(s);
! printk("EXT-fs: magic match failed\n");
return NULL;
}
if (!s->u.ext_sb.s_firstfreeblocknumber)
--- 83,91 ----
if (s->s_magic != EXT_SUPER_MAGIC) {
s->s_dev = 0;
unlock_super(s);
! if (!silent)
! printk("VFS: Can't find an extfs filesystem on dev 0x%04x.\n",
! dev);
return NULL;
}
if (!s->u.ext_sb.s_firstfreeblocknumber)
*** linux/fs/ext2/inode.c.~1~ Mon Mar 29 22:33:22 1993
--- linux/fs/ext2/inode.c Mon Mar 29 22:34:04 1993
***************
*** 107,113 ****
return 1;
}
! struct super_block * ext2_read_super (struct super_block * s, void * data)
{
struct buffer_head * bh;
struct ext2_super_block * es;
--- 107,114 ----
return 1;
}
! struct super_block * ext2_read_super (struct super_block * s, void * data,
! int silent)
{
struct buffer_head * bh;
struct ext2_super_block * es;
***************
*** 180,186 ****
s->s_dev = 0;
unlock_super (s);
brelse (bh);
! printk ("EXT2-fs: magic match failed\n");
return NULL;
}
if (s->s_blocksize != s->u.ext2_sb.s_frag_size) {
--- 181,189 ----
s->s_dev = 0;
unlock_super (s);
brelse (bh);
! if (!silent)
! printk("VFS: Can't find an ext2fs filesystem on dev 0x%04x.\n",
! dev);
return NULL;
}
if (s->s_blocksize != s->u.ext2_sb.s_frag_size) {
*** linux/fs/isofs/inode.c.~1~ Mon Mar 29 22:33:17 1993
--- linux/fs/isofs/inode.c Mon Mar 29 22:34:04 1993
***************
*** 91,97 ****
return 1;
}
! struct super_block *isofs_read_super(struct super_block *s,void *data)
{
struct buffer_head *bh;
int iso_blknum;
--- 91,98 ----
return 1;
}
! struct super_block *isofs_read_super(struct super_block *s,void *data,
! int silent)
{
struct buffer_head *bh;
int iso_blknum;
***************
*** 155,161 ****
brelse(bh);
}
if(iso_blknum == 100) {
! printk("Unable to identify CD-ROM format.\n");
s->s_dev = 0;
unlock_super(s);
return NULL;
--- 156,163 ----
brelse(bh);
}
if(iso_blknum == 100) {
! if (!silent)
! printk("Unable to identify CD-ROM format.\n");
s->s_dev = 0;
unlock_super(s);
return NULL;
*** linux/fs/minix/inode.c.~1~ Mon Mar 29 22:33:17 1993
--- linux/fs/minix/inode.c Mon Mar 29 22:34:04 1993
***************
*** 48,54 ****
minix_statfs
};
! struct super_block *minix_read_super(struct super_block *s,void *data)
{
struct buffer_head *bh;
struct minix_super_block *ms;
--- 48,55 ----
minix_statfs
};
! struct super_block *minix_read_super(struct super_block *s,void *data,
! int silent)
{
struct buffer_head *bh;
struct minix_super_block *ms;
***************
*** 83,89 ****
} else {
s->s_dev = 0;
unlock_super(s);
! printk("MINIX-fs magic match failed\n");
return NULL;
}
for (i=0;i < MINIX_I_MAP_SLOTS;i++)
--- 84,92 ----
} else {
s->s_dev = 0;
unlock_super(s);
! if (!silent)
! printk("VFS: Can't find a minix filesystem on dev 0x%04x.\n",
! dev);
return NULL;
}
for (i=0;i < MINIX_I_MAP_SLOTS;i++)
*** linux/fs/msdos/inode.c.~1~ Mon Mar 29 22:33:18 1993
--- linux/fs/msdos/inode.c Mon Mar 29 22:57:26 1993
***************
*** 136,142 ****
/* Read the super block of an MS-DOS FS. */
! struct super_block *msdos_read_super(struct super_block *s,void *data)
{
struct buffer_head *bh;
struct msdos_boot_sector *b;
--- 136,143 ----
/* Read the super block of an MS-DOS FS. */
! struct super_block *msdos_read_super(struct super_block *s,void *data,
! int silent)
{
struct buffer_head *bh;
struct msdos_boot_sector *b;
***************
*** 221,228 ****
sectors),b->total_sect,logical_sector_size);
}
if (error) {
s->s_dev = 0;
- printk("Unsupported FS parameters\n");
return NULL;
}
s->s_magic = MSDOS_SUPER_MAGIC;
--- 222,231 ----
sectors),b->total_sect,logical_sector_size);
}
if (error) {
+ if (!silent)
+ printk("VFS: Can't find a valid MSDOS filesystem on dev 0x%04x.\n",
+ s->s_dev);
s->s_dev = 0;
return NULL;
}
s->s_magic = MSDOS_SUPER_MAGIC;
*** linux/fs/nfs/inode.c.~1~ Mon Mar 29 22:33:22 1993
--- linux/fs/nfs/inode.c Mon Mar 29 22:34:05 1993
***************
*** 50,56 ****
* Later we can add other mount parameters like caching values.
*/
! struct super_block *nfs_read_super(struct super_block *sb, void *raw_data)
{
struct nfs_mount_data *data = (struct nfs_mount_data *) raw_data;
struct nfs_server *server;
--- 50,57 ----
* Later we can add other mount parameters like caching values.
*/
! struct super_block *nfs_read_super(struct super_block *sb, void *raw_data,
! int silent)
{
struct nfs_mount_data *data = (struct nfs_mount_data *) raw_data;
struct nfs_server *server;
*** linux/fs/proc/inode.c.~1~ Mon Mar 29 22:33:18 1993
--- linux/fs/proc/inode.c Mon Mar 29 22:34:05 1993
***************
*** 40,46 ****
proc_statfs
};
! struct super_block *proc_read_super(struct super_block *s,void *data)
{
lock_super(s);
s->s_blocksize = 1024;
--- 40,47 ----
proc_statfs
};
! struct super_block *proc_read_super(struct super_block *s,void *data,
! int silent)
{
lock_super(s);
s->s_blocksize = 1024;
*** linux/fs/super.c.~1~ Mon Mar 29 22:33:18 1993
--- linux/fs/super.c Tue Mar 30 09:20:55 1993
***************
*** 17,22 ****
--- 17,23 ----
#include <asm/system.h>
#include <asm/segment.h>
+
/*
* The definition of file_systems that used to be here is now in
***************
*** 29,34 ****
--- 30,37 ----
extern void wait_for_keypress(void);
extern void fcntl_init_locks(void);
+ extern int root_mountflags;
+
struct super_block super_block[NR_SUPER];
/* this is initialized in init/main.c */
***************
*** 118,124 ****
sb->s_op->put_super(sb);
}
! static struct super_block * read_super(dev_t dev,char *name,int flags,void *data)
{
struct super_block * s;
struct file_system_type *type;
--- 121,128 ----
sb->s_op->put_super(sb);
}
! static struct super_block * read_super(dev_t dev,char *name,int flags,
! void *data, int silent)
{
struct super_block * s;
struct file_system_type *type;
***************
*** 142,148 ****
}
s->s_dev = dev;
s->s_flags = flags;
! if (!type->read_super(s,data)) {
s->s_dev = 0;
return NULL;
}
--- 146,152 ----
}
s->s_dev = dev;
s->s_flags = flags;
! if (!type->read_super(s,data, silent)) {
s->s_dev = 0;
return NULL;
}
***************
*** 308,314 ****
iput(dir_i);
return -EBUSY;
}
! sb = read_super(dev,type,flags,data);
if (!sb || sb->s_covered) {
iput(dir_i);
return -EBUSY;
--- 312,318 ----
iput(dir_i);
return -EBUSY;
}
! sb = read_super(dev,type,flags,data,0);
if (!sb || sb->s_covered) {
iput(dir_i);
return -EBUSY;
***************
*** 452,465 ****
for (fs_type = file_systems; fs_type->read_super; fs_type++) {
if (!fs_type->requires_dev)
continue;
! sb = read_super(ROOT_DEV,fs_type->name,0,NULL);
if (sb) {
inode = sb->s_mounted;
inode->i_count += 3 ; /* NOTE! it is logically used 4 times, not 1 */
sb->s_covered = inode;
! sb->s_flags = 0;
current->pwd = inode;
current->root = inode;
return;
}
}
--- 456,472 ----
for (fs_type = file_systems; fs_type->read_super; fs_type++) {
if (!fs_type->requires_dev)
continue;
! sb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,1);
if (sb) {
inode = sb->s_mounted;
inode->i_count += 3 ; /* NOTE! it is logically used 4 times, not 1 */
sb->s_covered = inode;
! sb->s_flags = root_mountflags;
current->pwd = inode;
current->root = inode;
+ printk ("VFS: Mounted root (%s filesystem)%s.\n",
+ fs_type->name,
+ (sb->s_flags & MS_RDONLY) ? " readonly" : "");
return;
}
}
*** linux/fs/xiafs/inode.c.~1~ Mon Mar 29 22:33:18 1993
--- linux/fs/xiafs/inode.c Mon Mar 29 22:34:05 1993
***************
*** 55,61 ****
xiafs_statfs
};
! struct super_block *xiafs_read_super(struct super_block *s, void *data)
{
struct buffer_head *bh;
struct xiafs_super_block *sp;
--- 55,62 ----
xiafs_statfs
};
! struct super_block *xiafs_read_super(struct super_block *s, void *data,
! int silent)
{
struct buffer_head *bh;
struct xiafs_super_block *sp;
***************
*** 75,81 ****
s->s_dev = 0;
unlock_super(s);
brelse(bh);
! printk("XIA-FS: super magic mismatch\n");
return NULL;
}
s->s_blocksize = sp->s_zone_size;
--- 76,84 ----
s->s_dev = 0;
unlock_super(s);
brelse(bh);
! if (!silent)
! printk("VFS: Can't find a xiafs filesystem on dev 0x%04x.\n",
! dev);
return NULL;
}
s->s_blocksize = sp->s_zone_size;
*** linux/include/linux/ext2_fs.h.~1~ Mon Mar 29 22:33:19 1993
--- linux/include/linux/ext2_fs.h Mon Mar 29 22:34:06 1993
***************
*** 231,237 ****
extern void ext2_truncate (struct inode *);
extern void ext2_put_super (struct super_block *);
extern void ext2_write_super (struct super_block *);
! extern struct super_block * ext2_read_super (struct super_block *,void *);
extern void ext2_read_inode (struct inode *);
extern void ext2_write_inode (struct inode *);
extern void ext2_put_inode (struct inode *);
--- 231,237 ----
extern void ext2_truncate (struct inode *);
extern void ext2_put_super (struct super_block *);
extern void ext2_write_super (struct super_block *);
! extern struct super_block * ext2_read_super (struct super_block *,void *,int);
extern void ext2_read_inode (struct inode *);
extern void ext2_write_inode (struct inode *);
extern void ext2_put_inode (struct inode *);
*** linux/include/linux/ext_fs.h.~1~ Mon Mar 29 22:33:19 1993
--- linux/include/linux/ext_fs.h Mon Mar 29 22:34:06 1993
***************
*** 89,95 ****
extern void ext_truncate(struct inode *);
extern void ext_put_super(struct super_block *);
extern void ext_write_super(struct super_block *);
! extern struct super_block *ext_read_super(struct super_block *,void *);
extern void ext_read_inode(struct inode *);
extern void ext_write_inode(struct inode *);
extern void ext_put_inode(struct inode *);
--- 89,95 ----
extern void ext_truncate(struct inode *);
extern void ext_put_super(struct super_block *);
extern void ext_write_super(struct super_block *);
! extern struct super_block *ext_read_super(struct super_block *,void *,int);
extern void ext_read_inode(struct inode *);
extern void ext_write_inode(struct inode *);
extern void ext_put_inode(struct inode *);
*** linux/include/linux/fs.h.~1~ Mon Mar 29 22:33:19 1993
--- linux/include/linux/fs.h Mon Mar 29 22:34:06 1993
***************
*** 301,307 ****
};
struct file_system_type {
! struct super_block *(*read_super) (struct super_block *, void *);
char *name;
int requires_dev;
};
--- 301,307 ----
};
struct file_system_type {
! struct super_block *(*read_super) (struct super_block *, void *, int);
char *name;
int requires_dev;
};
*** linux/include/linux/iso_fs.h.~1~ Mon Mar 29 22:33:20 1993
--- linux/include/linux/iso_fs.h Mon Mar 29 22:34:06 1993
***************
*** 163,169 ****
extern int isofs_bmap(struct inode *,int);
extern void isofs_put_super(struct super_block *);
! extern struct super_block *isofs_read_super(struct super_block *,void *);
extern void isofs_read_inode(struct inode *);
extern void isofs_put_inode(struct inode *);
extern void isofs_statfs(struct super_block *, struct statfs *);
--- 163,169 ----
extern int isofs_bmap(struct inode *,int);
extern void isofs_put_super(struct super_block *);
! extern struct super_block *isofs_read_super(struct super_block *,void *,int);
extern void isofs_read_inode(struct inode *);
extern void isofs_put_inode(struct inode *);
extern void isofs_statfs(struct super_block *, struct statfs *);
*** linux/include/linux/minix_fs.h.~1~ Mon Mar 29 22:33:20 1993
--- linux/include/linux/minix_fs.h Mon Mar 29 22:34:07 1993
***************
*** 99,105 ****
extern void minix_truncate(struct inode *);
extern void minix_put_super(struct super_block *);
! extern struct super_block *minix_read_super(struct super_block *,void *);
extern void minix_read_inode(struct inode *);
extern void minix_write_inode(struct inode *);
extern void minix_put_inode(struct inode *);
--- 99,105 ----
extern void minix_truncate(struct inode *);
extern void minix_put_super(struct super_block *);
! extern struct super_block *minix_read_super(struct super_block *,void *,int);
extern void minix_read_inode(struct inode *);
extern void minix_write_inode(struct inode *);
extern void minix_put_inode(struct inode *);
*** linux/include/linux/msdos_fs.h.~1~ Mon Mar 29 22:33:20 1993
--- linux/include/linux/msdos_fs.h Mon Mar 29 22:34:08 1993
***************
*** 168,174 ****
extern void msdos_put_inode(struct inode *inode);
extern void msdos_put_super(struct super_block *sb);
! extern struct super_block *msdos_read_super(struct super_block *s,void *data);
extern void msdos_statfs(struct super_block *sb,struct statfs *buf);
extern int msdos_bmap(struct inode *inode,int block);
extern void msdos_read_inode(struct inode *inode);
--- 168,175 ----
extern void msdos_put_inode(struct inode *inode);
extern void msdos_put_super(struct super_block *sb);
! extern struct super_block *msdos_read_super(struct super_block *s,
! void *data,int);
extern void msdos_statfs(struct super_block *sb,struct statfs *buf);
extern int msdos_bmap(struct inode *inode,int block);
extern void msdos_read_inode(struct inode *inode);
*** linux/include/linux/nfs_fs.h.~1~ Mon Mar 29 22:33:21 1993
--- linux/include/linux/nfs_fs.h Mon Mar 29 22:34:08 1993
***************
*** 98,104 ****
/* linux/fs/nfs/inode.c */
! extern struct super_block *nfs_read_super(struct super_block *sb, void *data);
extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
struct nfs_fattr *fattr);
extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr);
--- 98,105 ----
/* linux/fs/nfs/inode.c */
! extern struct super_block *nfs_read_super(struct super_block *sb,
! void *data,int);
extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
struct nfs_fattr *fattr);
extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr);
*** linux/include/linux/proc_fs.h.~1~ Mon Mar 29 22:33:21 1993
--- linux/include/linux/proc_fs.h Mon Mar 29 22:34:08 1993
***************
*** 15,21 ****
char * name;
};
! extern struct super_block *proc_read_super(struct super_block *,void *);
extern void proc_put_inode(struct inode *);
extern void proc_put_super(struct super_block *);
extern void proc_statfs(struct super_block *, struct statfs *);
--- 15,21 ----
char * name;
};
! extern struct super_block *proc_read_super(struct super_block *,void *,int);
extern void proc_put_inode(struct inode *);
extern void proc_put_super(struct super_block *);
extern void proc_statfs(struct super_block *, struct statfs *);
*** linux/include/linux/xia_fs.h.~1~ Mon Mar 29 22:33:21 1993
--- linux/include/linux/xia_fs.h Mon Mar 29 22:34:08 1993
***************
*** 92,98 ****
extern void xiafs_truncate(struct inode *);
extern void xiafs_put_super(struct super_block *);
! extern struct super_block *xiafs_read_super(struct super_block *,void *);
extern void xiafs_read_inode(struct inode *);
extern void xiafs_write_inode(struct inode *);
extern void xiafs_put_inode(struct inode *);
--- 92,98 ----
extern void xiafs_truncate(struct inode *);
extern void xiafs_put_super(struct super_block *);
! extern struct super_block *xiafs_read_super(struct super_block *,void *,int);
extern void xiafs_read_inode(struct inode *);
extern void xiafs_write_inode(struct inode *);
extern void xiafs_put_inode(struct inode *);
*** linux/init/main.c.~1~ Mon Mar 29 11:39:17 1993
--- linux/init/main.c Tue Mar 30 10:26:59 1993
***************
*** 19,24 ****
--- 19,25 ----
#include <linux/unistd.h>
#include <linux/string.h>
#include <linux/timer.h>
+ #include <linux/fs.h>
extern unsigned long * prof_buffer;
extern unsigned long prof_len;
***************
*** 80,85 ****
--- 81,87 ----
#define EXT_MEM_K (*(unsigned short *)0x90002)
#define DRIVE_INFO (*(struct drive_info *)0x90080)
#define SCREEN_INFO (*(struct screen_info *)0x90000)
+ #define MOUNT_ROOT_RDONLY (*(unsigned short *)0x901F2)
#define RAMDISK_SIZE (*(unsigned short *)0x901F8)
#define ORIG_ROOT_DEV (*(unsigned short *)0x901FC)
#define AUX_DEVICE_INFO (*(unsigned char *)0x901FF)
***************
*** 153,158 ****
--- 155,161 ----
unsigned char aux_device_present;
int ramdisk_size;
+ int root_mountflags = 0;
static char command_line[80] = { 0, };
***************
*** 233,238 ****
--- 236,243 ----
if (memory_end > 16*1024*1024)
memory_end = 16*1024*1024;
#endif
+ if (MOUNT_ROOT_RDONLY)
+ root_mountflags |= MS_RDONLY;
if ((unsigned long)&end >= (1024*1024)) {
memory_start = (unsigned long) &end;
low_memory_start = 4096;